<template>
  <van-swipe class="swiper-dom-box" :autoplay="6000" indicator-color="white">
    <van-swipe-item v-for="(i,index) in  banners" :key="index" @click="href(i.link)">
      <img class="needsclick" v-lazy="i.img" alt />
    </van-swipe-item>
  </van-swipe>
</template>

<script type="text/ecmascript-6">
export default {
  props: ["banners"],
  methods: {
    href(i) {
      console.log(i);
      if (i) {
        this.$router.push({ path: i });
      }
    }
  }
};
</script>

<style scoped lang="less">
.swiper-dom-box {
  width: 100%;
  border-radius: 0.03rem;
  height: 2.82rem;
  background-image:url('./wait.png') ;
  background-repeat: no-repeat;
  background-size:.8rem ;
  background-position: center
}
</style>
